package facade

import (
	"github.com/kataras/iris/v12"
	"github.com/kataras/iris/v12/mvc"
	"{{.Namespace}}/pkg/query-service/infrastructure/test"
)

var app *iris.Application

func init() {
	test.InitQuery()

	app = iris.New()
	mvc.Configure(app.Party("/api/v1.0"), func(app *mvc.Application) {
		app.Handle(New{{.Aggregate.Name}}QueryApi())
		{{- range $i, $entity := .Aggregate.Entities }}
        app.Handle(New{{$entity.Name}}QueryApi())
		{{- end }}
	})
}
